package com.ozo.cloud.api.manage.feign;

import com.ozo.cloud.api.manage.vo.SysUserInfoVO;
import com.ozo.cloud.common.base.model.ResultVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 角色服务调用
 *
 * @author qiangesoft
 * @date 2024-09-11
 */
@FeignClient(name = "ozo-cloud-manage", contextId = "user", path = "/manage")
public interface SysUserFeignClient {

    @GetMapping("/feign/user/register")
    ResultVO<Void> register(@RequestParam("username") String username, @RequestParam("password") String password, @RequestParam("nickname") String nickname);

    @GetMapping("/feign/user/getByUsername")
    ResultVO<SysUserInfoVO> getByUsername(@RequestParam("username") String username);

    @GetMapping("/feign/user/getByMobile")
    ResultVO<SysUserInfoVO> getByMobile(@RequestParam("mobile") String mobile);

    @GetMapping("/feign/user/{id}")
    ResultVO<SysUserInfoVO> getByUserId(@PathVariable("id") Long id);

    @GetMapping("/feign/user/list")
    ResultVO<List<SysUserInfoVO>> listAll();

}
